package June12;

import java.util.Scanner;

public class CompanyTest {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		Company jc = new Company();
		jc.name="北大青鸟教育有限责任公司";
		jc.adress="安徽省合肥市合工大产业楼";
		jc.Tel = "0551-12345678";
		jc.area = "教育";
		
		int choice = 0;
		while (true) {
			System.out.println("1:查看员工信息，2：添新员工，3：删除员工，4:退出");
			choice = input.nextInt();
			if (choice == 1) {
				jc.show();
			} else if (choice == 2) {
				System.out.println("员工的名字：");
				String newStu = input.next();
				jc.add(newStu);
			} else if (choice == 3) {
				System.out.println("请输入您要删除的员工姓名:");
				String a = input.next();
				boolean isFind = jc.find(a);
				if (isFind) {
					jc.delete(a);
				} else {
					System.out.println("查无此人");
				}
			} else if (choice == 4) {
				break;
			}
		}
	}
}
